def print_hollow_square(size):
    for i in range(size):
        # 打印顶边和底边
        if i == 0 or i == 1 or i == size - 1 or i== size -2 :
            print(" * " * size)
        else:
            # 打印侧边，除了第一个和最后一个字符
            print(" *  * " + "   " * (size - 4) + " *  * ")

# 示例：绘制一个5x5的空心的正方形
print_hollow_square(8)